home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / pgs3h1.lha / 3.0hUpdate / PostScript.LHA / PostScript.prolog < prev   
Text File  |  1995-06-28  |  26KB  |  902 lines

  1. %%BeginProlog
  2. % $VER: PostScript.prolog 1.0g (20.06.95)
  3. % fixed picstr problem in BeginRGBBitmap (7.10.94)
  4. % added font reencoding support (29.10.94)
  5. % complete change to fill/stroke for support for text (02.02.95)
  6. % fixed landscape to non-letter sizes
  7. % fixed grave/quotesingle encoding (15.02.95)
  8. % changed for new tm2d based code w/ new object calls (15.03.95)
  9. % fixed process color seps (24.03.95)
  10. % added PPDSetup/PPDCleanup (20.06.95)
  11. %Copyright 1994-95 Soft-Logik Publishing Corp.
  12.  
  13. /AsphaltDict dup 153 dict def load begin
  14.  
  15. %
  16. % basic definitions
  17. %
  18. /bdef {bind def}bind def
  19. /xdef {exch def}bdef
  20. /ldef {load def}bdef
  21. /dmatrix matrix def
  22. /tmatrix matrix def
  23. /pmatrix matrix def
  24. /omatrix matrix def
  25.  
  26. /deltax 0 def
  27. /deltay 0 def
  28. /slant 0 def
  29. /twist 0 def
  30. /xscl 0 def
  31. /yscl 0 def
  32. /bang 0 def
  33. /eang 0 def
  34.  
  35. /tilescalex 0 def
  36. /tilescaley 0 def
  37. /bh 0 def
  38. /bv 0 def
  39.  
  40. %
  41. % fill defines
  42. %
  43. /SG /setgray ldef
  44. systemdict /setcmykcolor known not
  45.  {/SCMYK {1 sub 4 1 roll 3 {3 index add neg dup 0 lt{pop 0}if 3 1 roll}repeat setrgbcolor pop}bdef}
  46.  {/SCMYK /setcmykcolor ldef}ifelse
  47.  
  48. %
  49. % drawing definitions
  50. %
  51. /sclm [0 0 0 0 0 0] def
  52. /scl{deltay sub exch deltax sub exch transform round .2 add exch round .2 add exch itransform}bdef
  53.  
  54. %
  55. %
  56. %
  57. /PGSEncoding 256 array def
  58. % duplicates: acute, quoteleft, quoteright
  59. % 000-007
  60. /.notdef        /dotlessi        /grave            /acute            /circumflex        /tilde            /breve            /dotaccent
  61. % 010-017
  62. /ring            /hungarumlaut    /ogonek            /caron            /.notdef        /.notdef        /.notdef        /.notdef
  63. % 020-027
  64. /quotedblbase    /quotesinglbase    /quotesingle    /quoteleft        /quoteright        /.notdef        /.notdef        /.notdef
  65. % 030-037
  66. /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef        /.notdef
  67. % 040-047
  68. /space            /exclam            /quotedbl        /numbersign        /dollar            /percent        /ampersand        /quotesingle
  69. % 050-057
  70. /parenleft        /parenright        /asterisk        /plus            /comma            /hyphen            /period            /slash
  71. % 060-067
  72. /zero            /one            /two            /three            /four            /five            /six            /seven
  73. % 070-077
  74. /eight            /nine            /colon            /semicolon        /less            /equal            /greater        /question
  75. % 100-107
  76. /at                /A                /B                /C                /D                /E                /F                /G
  77. % 110-117
  78. /H                /I                /J                /K                /L                /M                /N                /O
  79. % 120-127
  80. /P                /Q                /R                /S                /T                /U                /V                /W
  81. % 130-137
  82. /X                /Y                /Z                /bracketleft    /backslash        /bracketright    /asciicircum    /underscore
  83. % 140-147
  84. /grave            /a                /b                /c                /d                /e                /f                /g
  85. % 150-157
  86. /h                /i                /j                /k                /l                /m                /n                /o
  87. % 160-167
  88. /p                /q                /r                /s                /t                /u                /v                /w
  89. % 170-177
  90. /x                /y                /z                /braceleft        /bar            /braceright        /asciitilde        /.notdef
  91. % 200-207
  92. /perthousand    /florin            /notequal        /infinity        /lessequal        /greaterequal    /.notdef        /.notdef
  93. % 210-217
  94. /ellipsis        /endash            /emdash            /quotedblleft    /quotedblright    /guilsinglleft    /guilsinglright    /pi                
  95. % 220-227
  96. /fraction        /dagger            /daggerdbl        /trademark        /bullet            /fi                /fl                /Ydieresis        
  97. % 230-237
  98. /Lslash            /lslash            /OE                /oe                /Scaron            /scaron            /Zcaron            /zcaron            
  99. % 240-247
  100. /space            /exclamdown        /cent            /sterling        /currency        /yen            /brokenbar        /section
  101. % 250-257
  102. /dieresis        /copyright        /ordfeminine    /guillemotleft    /logicalnot        /minus            /registered        /macron
  103. % 260-267
  104. /degree            /plusminus        /twosuperior    /threesuperior    /acute            /mu                /paragraph        /periodcentered
  105. % 270-277
  106. /cedilla        /onesuperior    /ordmasculine    /guillemotright    /onequarter        /onehalf        /threequarters    /questiondown
  107. % 300-307
  108. /Agrave            /Aacute            /Acircumflex    /Atilde            /Adieresis        /Aring            /AE                /Ccedilla
  109. % 310-317
  110. /Egrave            /Eacute            /Ecircumflex    /Edieresis        /Igrave            /Iacute            /Icircumflex    /Idieresis
  111. % 320-327
  112. /Eth            /Ntilde            /Ograve            /Oacute            /Ocircumflex    /Otilde            /Odieresis        /multiply
  113. % 330-337
  114. /Oslash            /Ugrave            /Uacute            /Ucircumflex    /Udieresis        /Yacute            /Thorn            /germandbls
  115. % 340-347
  116. /agrave            /aacute            /acircumflex    /atilde            /adieresis        /aring            /ae                /ccedilla
  117. % 350-357
  118. /egrave            /eacute            /ecircumflex    /edieresis        /igrave            /iacute            /icircumflex    /idieresis
  119. % 360-367
  120. /eth            /ntilde            /ograve            /oacute            /ocircumflex    /otilde            /odieresis        /divide
  121. % 370-377
  122. /oslash            /ugrave            /uacute            /ucircumflex    /udieresis        /yacute            /thorn            /ydieresis
  123. PGSEncoding 0 256 getinterval astore pop
  124.  
  125. %
  126. % path constructors
  127. %
  128. % - N -
  129. /N/newpath ldef
  130.  
  131. % x y M -
  132. /M{scl moveto}bdef
  133.  
  134. % x y L -
  135. /L{scl lineto}bdef
  136.  
  137. % cx1 cy1 cx2 cy2 px2 py2 C -
  138. /C{scl 6 2 roll scl 6 2 roll scl 6 2 roll curveto}bdef
  139.  
  140. % cx cy rx ry ba ea slant twist A -
  141. /A{/twist xdef/slant xdef/eang xdef/bang xdef/yscl xdef/xscl xdef scl translate xscl yscl scale sclm 0 twist cos put
  142. sclm 1 twist sin put sclm 2 slant sin neg put sclm 3 slant cos put sclm concat 0 0 1 bang eang arc omatrix setmatrix}bdef
  143.  
  144. % cx cy rx ry ba ea slant twist AN -
  145. /AN{/twist xdef/slant xdef/eang xdef/bang xdef/yscl xdef/xscl xdef scl translate xscl yscl scale sclm 0 twist cos put
  146. sclm 1 twist sin put sclm 2 slant sin neg put sclm 3 slant cos put sclm concat 0 0 1 bang eang arcn omatrix setmatrix}bdef
  147.  
  148. % - CP -
  149. /CP{closepath}bdef
  150.  
  151. %
  152. % pattern fill operators
  153. %
  154. % - patternpath -
  155. /patternpath{ %bdef
  156.   /mypatternfont findfont begin FontDict /ctm get setmatrix
  157.   currentdict setfont
  158.  
  159.   FontDict begin
  160.     FontMatrix concat
  161.     width 0 dtransform
  162.     round width div exch round width div exch
  163.     0 height dtransform
  164.     round height div exch
  165.     round height div exch
  166.     0 0 transform round exch round exch
  167.     ptm astore setmatrix
  168.     pathbbox
  169.     height div ceiling height mul 4 1 roll
  170.     width div ceiling width mul 4 1 roll
  171.     height div floor height mul 4 1 roll
  172.     width div floor width mul 4 1 roll
  173.     2 index sub height div ceiling cvi exch
  174.     3 index sub width div ceiling cvi exch
  175.     4 2 roll moveto
  176.     FontMatrix ptm invertmatrix pop
  177.     { %repeat
  178.       gsave
  179.       ptm concat
  180.       dup str length idiv {str show}repeat
  181.       dup str length mod str exch 0 exch getinterval show
  182.       grestore
  183.       0 height rmoveto
  184.     }repeat
  185.     pop
  186.   end end
  187. }bdef
  188.  
  189. % - patternfill -
  190. /patternfill{ %bdef
  191.   gsave
  192.   1 setgray
  193.   fill
  194.   grestore
  195.  
  196.   gsave
  197.   clip patternpath
  198.   grestore
  199.   newpath
  200. }bdef
  201.  
  202. % - patterneofill -
  203. /patterneofill{ %bdef
  204.   gsave
  205.   1 setgray
  206.   eofill
  207.   grestore
  208.  
  209.   gsave
  210.   eoclip patternpath
  211.   grestore
  212.   newpath
  213. }bdef
  214.  
  215. % - patternstroke -
  216. /patternstroke{ %bdef
  217.   strokepath
  218.   gsave
  219.   1 setgray
  220.   eofill
  221.   grestore
  222.  
  223.   gsave
  224.   clip patternpath
  225.   grestore
  226.   newpath
  227. }bdef
  228.  
  229. % <pattern> P -
  230. /P{
  231.  /pattern xdef
  232.  /mypatternfont findfont begin
  233.  FontDict begin
  234.  true
  235.   0 1 patterncount 1 sub {
  236.    dup patterns exch get pattern eq
  237.       {0 1 str length 1 sub{str exch 2 index put}for pop pop false exit}
  238.    if
  239.    pop
  240.  }for
  241.  {
  242.    patterns patterncount pattern put
  243.     0 1 str length 1 sub {str exch patterncount put}for
  244.    /patterncount patterncount 1 add def
  245.  }if
  246.  end
  247.  end
  248.  /FILL{patternfill}bdef
  249.  /EOFILL{patterneofill}bdef
  250.  /STROKE{patternstroke}bdef
  251. }bdef
  252.  
  253. /S{
  254.  /FILL{fill}bdef
  255.  /EOFILL{eofill}bdef
  256.  /STROKE{stroke}bdef
  257. }bdef
  258.  
  259. %
  260. % gradient/radial/shape fill operators
  261. %
  262. /DOGRAD{
  263.  gsave pmatrix setmatrix flattenpath exec 
  264.  pathbbox /ury xdef /urx xdef /lly xdef /llx xdef
  265.  angle 0 lt{/angle angle 360 add def}if
  266.  angle 180 gt{/angle angle 180 sub def tc1 tc2 /tc1 xdef /tc2 xdef}if
  267.  angle 90 gt{ /quad {ury exch sub}bdef tc1 tc2 /tc1 xdef /tc2 xdef}{ /quad {lly add}bdef}ifelse
  268.  /l urx llx sub def
  269.  /w ury lly sub def
  270.  /v angle dup 90 gt{90 sub neg 90 add}if dup sin l mul exch cos w mul add 2 mul def
  271.  /d angle dup 90 gt{90 sub neg 90 add}if dup sin w mul exch cos l mul add def
  272.  /steps d 72 div currentscreen pop pop mul cvi 1 add dup 256 gt{pop 256}if def
  273.  /dd d steps div def
  274.  
  275.  0 1 steps
  276.  {
  277.   steps div dup /frac xdef ramp /rfrac xdef
  278.   tc2 0 get tc1 0 get sub rfrac mul tc1 0 get add
  279.   tc2 1 get tc1 1 get sub rfrac mul tc1 1 get add
  280.   tc2 2 get tc1 2 get sub rfrac mul tc1 2 get add
  281.   tc2 3 get tc1 3 get sub rfrac mul tc1 3 get add scmyk
  282.  
  283.   newpath gsave
  284.   l frac mul llx add
  285.   w frac mul quad translate angle rotate 
  286.   dd 2 div neg v 2 div neg moveto
  287.   0 v rlineto dd 0 rlineto 0 v neg rlineto closepath
  288.   FILL grestore
  289.  }for
  290.  
  291.  grestore
  292. }bdef
  293.  
  294. %
  295. %
  296. /DORADIAL{
  297.  gsave pmatrix setmatrix flattenpath exec 
  298.  pathbbox /ury xdef /urx xdef /lly xdef /llx xdef
  299.  /xc llx urx add 2 div dx add def
  300.  /yc lly ury add 2 div dy add def
  301.  /radius llx xc sub abs dup mul sqrt lly yc sub abs dup mul sqrt add def
  302.  
  303.  /steps radius 72 div currentscreen pop pop mul cvi 1 add dup 256 gt{pop 256}if def
  304.  
  305.  steps -1 0
  306.  {
  307.   steps div dup /frac xdef ramp /rfrac xdef
  308.   tc2 0 get tc1 0 get sub rfrac mul tc1 0 get add
  309.   tc2 1 get tc1 1 get sub rfrac mul tc1 1 get add
  310.   tc2 2 get tc1 2 get sub rfrac mul tc1 2 get add
  311.   tc2 3 get tc1 3 get sub rfrac mul tc1 3 get add scmyk
  312.   newpath xc yc radius frac mul 0 360 arc FILL
  313.  }for
  314.  
  315.  grestore
  316. }bdef
  317.  
  318. %
  319. %
  320. /DOSHAPE{
  321.  /steps 30 def
  322.  /fillproc xdef
  323.  
  324.  currentflat mark currentflat
  325.  {
  326.   {
  327.    dup setflat mark fillproc
  328.  
  329.    tc1 0 get tc1 1 get tc1 2 get tc1 3 get scmyk
  330.    currentflat mark currentflat
  331.    {
  332.     dup setflat mark
  333.     {FILL}gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  334.    }loop
  335.    cleartomark setflat
  336.  
  337.    steps -1 0
  338.    {
  339.     steps div dup /frac xdef ramp /rfrac xdef
  340.     tc1 0 get tc2 0 get sub rfrac mul tc2 0 get add
  341.     tc1 1 get tc2 1 get sub rfrac mul tc2 1 get add
  342.     tc1 2 get tc2 2 get sub rfrac mul tc2 2 get add
  343.     tc1 3 get tc2 3 get sub rfrac mul tc2 3 get add scmyk
  344.     []0 setdash xc 2 mul frac mul setlinewidth
  345.  
  346.     currentflat mark currentflat
  347.     {
  348.      dup setflat mark
  349.      {STROKE}gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  350.     }loop
  351.     cleartomark setflat
  352.  
  353.    }for
  354.   }
  355. %  gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {cleartomark setflat stop}if}{cleartomark exit}ifelse
  356.   gsave stopped grestore {cleartomark 1.3 mul dup 100 gt {exit}if}{cleartomark exit}ifelse
  357.  }loop
  358.  cleartomark setflat
  359. }bdef
  360.  
  361. %
  362. % join miterlimit cap [dashpattern] dashoffset width ST -
  363. %
  364. /ST {
  365.  setlinewidth setdash setlinecap
  366.  2 div sin 1 exch div setmiterlimit
  367.  setlinejoin strokepath
  368. }bdef
  369.  
  370. % fill functions
  371. %
  372. % endfunc scale angle x y LNE -
  373. %
  374. /LNE {
  375.  scl translate rotate dup scale
  376.  load exec
  377.  omatrix setmatrix
  378. }bdef
  379.  
  380. %
  381. % screen spot functions
  382. %
  383. /SSNewDot {180 mul cos exch 180 mul cos add 2 div}bdef
  384. /SSDot {dup mul exch dup mul add 1.0 exch sub}bdef
  385. /SSRing {dup mul exch dup mul add 1.0 exch sub abs 1.0 exch sub}bdef
  386. /SSDonut {dup mul exch dup mul add sqrt .5 sub abs 1.0 exch sub}bdef
  387. /SSLine {exch pop abs}bdef
  388. /SSTriangle {2 exch sub exch abs 2 mul sub 3 div}bdef
  389. /SSPropeller {/y xdef /x xdef y x .001 add atan cvi 72 mod 72 sub abs 72 div y y mul x x mul add 1 exch sub add 2 div}bdef
  390.  
  391. %
  392. % fountain blend functions
  393. %
  394. /FBLinear {}bdef
  395. /FBInvLinear {1 exch sub}bdef
  396. /FBLog {9 mul 1 add log}bdef
  397. /FBInvLog {9 mul 1 add log 1 exch sub}bdef
  398. /FBSin {180 mul sin}bdef
  399. /FBInvSin {180 mul sin 1 exch sub}bdef
  400. /FBSaw {2 mul dup 1 gt {2 exch sub}if}bdef
  401. /FBInvSaw {2 mul dup 1 gt {2 exch sub}if 1 exch sub}bdef
  402.  
  403. %
  404. % line end functions
  405. %
  406. /LERound {0 0 moveto 0 0 .5 -90 90 arc closepath}bdef
  407. /LEArrow {0 0 moveto 0 2 lineto 6 0 lineto 0 -2 lineto closepath}bdef
  408. /LEArrow1 {0 0 moveto 0 2 lineto 6 0 lineto 0 -2 lineto closepath}bdef
  409. /LEArrow2 {0 0 moveto -2 2 lineto 6 0 lineto -2 -2 lineto closepath}bdef
  410. /LEArrow3 {6 0 moveto -3 0 2.31 300 60 arc closepath}bdef
  411. /LEArrow4 {-1 0 moveto -4 2 .5 240 60 arcn 0 0 .5 60 300 arcn -4 -2 .5 300 120 arcn closepath}bdef
  412. /LESpike1 {0 .5 moveto .5 2 lineto 1 .5 lineto 6 0 lineto 1 -.5 lineto .5 -2 lineto 0 -.5 lineto closepath}bdef
  413. /LESpike2 {0 .5 moveto 2 2 lineto 6 0 lineto 2 -2 lineto 0 -.5 lineto closepath}bdef
  414. /LEFeather1 {-2 0 moveto 0 2 lineto 6 2 lineto 4 0 lineto 6 -2 lineto 0 -2 lineto closepath}bdef
  415. /LEFeather2 {0 -2 moveto 0 0 2 270 90 arcn 6 0 2 90 270 arc closepath}bdef
  416. /LEBox {-2 0 moveto -2 2 lineto 2 2 lineto 2 -2 lineto -2 -2 lineto closepath}bdef
  417. /LEDiamond {-2 0 moveto 0 2 lineto 2 0 lineto 0 -2 lineto closepath}bdef
  418. /LEBall {0 0 moveto 0 0 2 360 0 arcn closepath}bdef
  419. /LEEllipse {2 1 scale 0 0 moveto 0 0 2 360 0 arcn closepath}bdef
  420.  
  421. %
  422. % freq angle spot SS -
  423. %
  424. /SS {
  425.  load setscreen
  426. }bdef
  427.  
  428. %
  429. % text prototypes
  430. %
  431. % (string) F1 -
  432. % (string) kernamt F2 -
  433. % (string) skernamt F3 -
  434. % (string) skernamt kernamt F4 -
  435. %
  436.  
  437. %
  438. % c m y k CMYK -
  439. %
  440. /CMYK {
  441.  scmyk
  442.  
  443.  /FP{FILL}bdef
  444.  /EP{EOFILL}bdef
  445.  /SP{STROKE}bdef
  446.  
  447.  /F1{show}bdef
  448.  /F2{exch 0 exch ashow}bdef
  449.  /F3{exch 0 exch 32 exch widthshow}bdef
  450.  /F4{0 exch 32 exch 0 6 -1 roll awidthshow}bdef
  451.  
  452.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  453.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  454.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  455.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  456. }bdef
  457.  
  458. %
  459. % angle /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKGRAD -
  460. %
  461. /CMYKGRAD{
  462.  /tc2 xdef
  463.  /tc1 xdef
  464.  /ramp exch ldef
  465.  /angle xdef
  466.  
  467.  /FP{{clip} DOGRAD}bdef
  468.  /EP{{eoclip} DOGRAD}bdef
  469.  /SP{strokepath {clip} DOGRAD}bdef
  470.  
  471.  /F1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto}for}bdef
  472.  /F2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  473.  /F3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  474.  /F4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  475.  
  476.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  477.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  478.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  479.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  480. }bdef
  481.  
  482. %
  483. % dx dy /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKRADIAL -
  484. %
  485. /CMYKRADIAL{
  486.  /tc2 xdef
  487.  /tc1 xdef
  488.  /ramp exch ldef
  489.  /dy xdef
  490.  /dx xdef
  491.  
  492.  /FP{{clip} DORADIAL}bdef
  493.  /EP{{eoclip} DORADIAL}bdef
  494.  /SP{strokepath {clip} DORADIAL}bdef
  495.  
  496.  /F1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto}for}bdef
  497.  /F2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  498.  /F3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  499.  /F4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  500.  
  501.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  502.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  503.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  504.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  505. }bdef
  506.  
  507. %
  508. % inset /ramp [c1 m1 y1 k1][c2 m2 y2 k2] CMYKSHAPE -
  509. %
  510. /CMYKSHAPE{
  511.  /tc2 xdef
  512.  /tc1 xdef
  513.  /ramp exch ldef
  514.  /xc xdef
  515.  
  516.  /FP{{clip} DOSHAPE}bdef
  517.  /EP{{eoclip} DOSHAPE}bdef
  518.  /SP{strokepath {clip} DOSHAPE}bdef
  519.  
  520.  /F1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto}for}bdef
  521.  /F2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  522.  /F3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  523.  /F4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath FP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  524.  
  525.  /S1{dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto}for}bdef
  526.  /S2{/dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore stringwidth rmoveto dx 0 rmoveto}for}bdef
  527.  /S3{/dy xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  528.  /S4{/dy xdef /dx xdef dup length 1 sub 0 exch 1 exch {1 index exch 1 getinterval dup gsave false charpath SP grestore dup stringwidth rmoveto dx 0 rmoveto ( ) eq {dy 0 rmoveto}if}for}bdef
  529. }bdef
  530.  
  531.  
  532. /installcolor {
  533.  dup type /stringtype eq {pop dangle}if exch dup type /stringtype eq {pop dfreq}if exch /dspot load setscreen
  534.  
  535.  /sepmode xdef
  536.  
  537.  sepmode 1 eq {
  538.   /scmyk{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll}repeat setrgbcolor pop}bdef
  539.   /setgray /SG load def
  540.  }if
  541.  
  542.  sepmode 2 eq {
  543.   /scmyk /SCMYK load def
  544.   /setgray /SG load def
  545.  }if
  546.  
  547.  sepmode 3 eq {
  548.   /sepcolor xdef
  549.   sepcolor 0 get 0 ne {/scmyk {pop pop pop 1 exch sub SG}bdef /setgray {pop 1 SG}bdef}if
  550.   sepcolor 1 get 0 ne {/scmyk {pop pop 1 exch sub SG pop}bdef /setgray {pop 1 SG}bdef}if
  551.   sepcolor 2 get 0 ne {/scmyk {pop 1 exch sub SG pop pop}bdef /setgray {pop 1 SG}bdef}if
  552.   sepcolor 3 get 0 ne {/scmyk {1 exch sub SG pop pop pop}bdef /setgray /SG load def}if
  553.  }if
  554.  
  555.  sepmode 4 eq {
  556.   /sepcolor xdef
  557.   /scmyk {
  558.    sepcolor 3 get eq exch
  559.    sepcolor 2 get eq and exch
  560.    sepcolor 1 get eq and exch
  561.    sepcolor 0 get eq and {0 SG}{1 SG}ifelse}bdef
  562.   sepcolor 3 get 1 eq sepcolor 2 get 0 eq and sepcolor 1 get 0 eq and sepcolor 0 get 0 eq and {/setgray /SG load def}{/setgray {pop 1 SG}bdef}ifelse
  563.  }if
  564.  /setcmykcolor /scmyk load def
  565.  
  566.  currentscreen /cspot xdef /cangle xdef /cfreq xdef
  567. }bdef
  568.  
  569. %
  570. % #copies BEGINDOCUMENT -
  571. %
  572. /BeginDocument{
  573.  /#copies xdef
  574.  
  575.   7 dict begin
  576.     /FontDict 12 dict def
  577.     FontDict begin
  578.       /key /mypatternfont def
  579.       /patterns 256 array def
  580.       /patterncount 0 def
  581.       /char 0 def
  582.       /mtx [300 72 div 0 0 300 72 div 0 0] matrix invertmatrix def
  583.       /height 30 def
  584.       /width 30 def
  585.       /ctm matrix currentmatrix def
  586.       /ptm matrix identmatrix def
  587.       /str 32 string def
  588.     end
  589.     /FontBBox [0 0 FontDict /width get FontDict /height get] def
  590.     /FontMatrix FontDict /mtx get def
  591.     /Encoding 256 array 0 1 255 {1 index exch dup 3 string cvs cvn put}for def
  592.     /FontType 3 def
  593.     /BuildChar { %def
  594.       exch begin
  595.       FontDict begin
  596.       /char xdef
  597.        width 0 0 0 width height setcachedevice
  598.       width height scale 8 8 true [8 0 0 -8 0 8] {patterns char get}imagemask
  599.       end end
  600.     }def
  601.     FontDict /key get currentdict definefont pop
  602.   end
  603.  
  604.  /dmatrix dmatrix currentmatrix def
  605.  currentscreen /dspot xdef /dangle xdef /dfreq xdef
  606. }bdef
  607.  
  608. %
  609. % /newfontname /fontname RE -
  610. %
  611. /RE{
  612.  findfont dup length dict begin { %forall
  613.   1 index /FID ne {def}{pop pop}ifelse
  614.  }forall
  615.  /Encoding PGSEncoding def
  616.  /FontName 1 index def
  617.  currentdict definefont pop
  618.  end
  619. }bdef
  620.  
  621. %
  622. % /fontname xscale yscale F -
  623. %
  624. /f{
  625.  /yscale xdef /xscale xdef
  626.  findfont [xscale 0 0 yscale 0 0] makefont setfont
  627. }bdef
  628.  
  629. %
  630. % - ENDOCUMENT -
  631. %
  632. /EndDocument{
  633. }bdef
  634.  
  635. %
  636. % [sepcolor] sepmode freq/(DEFAULT) angle/(DEFAULT) tilew tileh landscape scaleh scalex paperw paperh BEGINTILE -
  637. %
  638. /BeginTile{
  639.  2 div exch 2 div exch translate
  640.  /tilescaley xdef /tilescalex xdef tilescalex tilescaley scale
  641.  {90 rotate} if
  642.  -2 div exch -2 div exch translate
  643.  
  644.  installcolor
  645.  
  646.  /tmatrix tmatrix currentmatrix def
  647. }bdef
  648.  
  649. %
  650. % - ENDTILE -
  651. %
  652. /EndTile{
  653.  dmatrix setmatrix
  654. }bdef
  655.  
  656. %
  657. % [sepcolor] sepmode freq/(DEFAULT) angle/(DEFAULT) title left top right bottom THUMBNAILMARKS -
  658. %
  659. /ThumbnailMarks{
  660.  /tiley2 xdef
  661.  /tilex2 xdef
  662.  /tiley1 xdef
  663.  /tilex1 xdef
  664.  /title1 xdef
  665.  
  666.  tmatrix setmatrix
  667.  .5 SG 6 setlinewidth
  668.  newpath
  669.  tilex1 3 add tiley2 3 sub moveto
  670.  tilex2 3 add tiley2 3 sub lineto
  671.  tilex2 3 add tiley1 3 sub lineto stroke
  672.  
  673.  0 SG [] 0 setdash .3 setlinewidth 0 setlinejoin 0 setlinecap
  674.  newpath tilex1 tiley1 moveto tilex2 tiley1 lineto tilex2 tiley2 lineto tilex1 tiley2 lineto closepath stroke
  675.  
  676.  gsave tilex1 tilex2 add 2 div tiley2 translate 1 tilescalex div 1 tilescaley div scale -2 -6 bv sub translate
  677.  /Courier findfont 6 scalefont setfont
  678.  0 0 moveto title1 show
  679.  grestore
  680.  
  681.  installcolor
  682. }bdef
  683.  
  684. %
  685. % left top BEGINPAGE
  686. %
  687. /BeginPage{
  688.  tmatrix setmatrix translate 
  689.  /pmatrix pmatrix currentmatrix def
  690. }bdef
  691.  
  692. %
  693. % ENDPAGE
  694. %
  695. /EndPage{
  696.  tmatrix setmatrix
  697. }bdef
  698.  
  699. /PPDSetup{countdictstack mark}bdef
  700. /PPDCleanup{stopped cleartomark countdictstack exch sub dup 0 gt{{end}repeat}{pop}ifelse}bdef
  701.  
  702. %
  703. % aboutx abouty slant twist BO
  704. %
  705. /BO{
  706.  /twist xdef
  707.  /slant xdef
  708.  /deltay xdef
  709.  /deltax xdef
  710.  
  711.  pmatrix setmatrix deltax deltay translate
  712.  sclm 0 twist cos put sclm 1 twist sin put sclm 2 slant sin neg put sclm 3 slant cos put sclm concat
  713.  /omatrix omatrix currentmatrix def
  714. }bdef
  715.  
  716. %
  717. % EO
  718. %
  719. /EO {pmatrix setmatrix}bdef
  720.  
  721. %
  722. % - BEGINCLIP -
  723. %
  724. /BeginClip {/PGSClipSave save def clip}bdef
  725.  
  726. %
  727. % - ENDCLIP -
  728. %
  729. /EndClip {PGSClipSave restore}bdef
  730.  
  731. %
  732. % xscale yscale xoffset yoffset pixelw pixelh bitsperpixel BEGINBITMAP -
  733. %
  734. /BeginBitmap {
  735.  /bpp xdef /h xdef /w xdef
  736.  scl translate scale save /picstr 8 bpp idiv dup w add 1 sub exch idiv string def
  737.  w h bpp [w 0 0 h neg 0 h] {currentfile picstr readhexstring pop}bind image
  738. }bdef
  739.  
  740. %
  741. % xscale yscale xoffset yoffset pixelw pixelh bitsperpixel BEGINRGBBITMAP -
  742. %
  743. /BeginRGBBitmap {
  744.  /bpp xdef /h xdef /w xdef
  745.  scl translate scale save /picstr 8 bpp idiv dup w 3 mul add 1 sub exch idiv string def
  746.  w h bpp [w 0 0 h neg 0 h] {currentfile picstr readhexstring pop}bind false 3 colorimage
  747. }bdef
  748.  
  749. %
  750. % - ENDBITMAP -
  751. %
  752. /EndBitmap {restore omatrix setmatrix}bdef
  753.  
  754. %
  755. % xscalex yscale xoffset yoffset BEGINEPS -
  756. %
  757. /BeginEPS {
  758.  scl translate scale translate
  759.  /PGSEPSSave save def /showpage {}bdef
  760.  newpath [] 0 setdash 1 setlinewidth 0 setgray
  761. }bdef
  762.  
  763. %
  764. % - ENDEPS -
  765. %
  766. /EndEPS {PGSEPSSave restore}bdef
  767.  
  768. %
  769. % angle cx cy cropmark -
  770. %
  771. /cropmark {
  772.   gsave translate 1 tilescalex div 1 tilescaley div scale rotate
  773.   .3 setlinewidth newpath
  774.   bh 5 add 0 moveto 20 0 rlineto
  775.   0 bv 5 add moveto 0 20 rlineto
  776.   stroke grestore
  777. }bdef
  778.  
  779. %
  780. % dx dy cx cy regmark -
  781. %
  782. /regmark {
  783.   gsave translate 1 tilescalex div 1 tilescaley div scale translate
  784.   .3 setlinewidth newpath
  785.   10 0 moveto 0 0 10 0 360 arc
  786.   1 SG fill
  787.   8 0 moveto 0 0 8 0 360 arc
  788.   -10 0 moveto 10 0 lineto 0 -10 moveto 0 10 lineto
  789.   0 SG stroke
  790.   4 0 moveto 0 0 4 0 360 arc
  791.   fill
  792.   -4 0 moveto 4 0 lineto 0 -4 moveto 0 4 lineto
  793.   1 SG stroke
  794.   grestore
  795. }bdef
  796.  
  797. %
  798. % dx dy cx cy slurgauge -
  799. %
  800. /slurgauge {
  801.   gsave translate 1 tilescalex div 1 tilescaley div scale translate
  802.   .3 setlinewidth newpath
  803.   0 0 10 0 360 arc
  804.   1 SG fill
  805.   0 0 10 0 360 arc
  806.   0 SG stroke
  807.   36 { 1 0 moveto 0 0 10 -2.5 2.5 arc fill 10 rotate}repeat
  808.   grestore
  809. }bdef
  810.  
  811. /boxit {newpath moveto 14 0 rlineto 0 -14 rlineto -14 0 rlineto closepath}def
  812.  
  813. %
  814. % angle dx dy cx cy colorstrip -
  815. %
  816. /colorstrip {
  817.   gsave translate 1 tilescalex div 1 tilescaley div scale translate rotate
  818.  
  819.   /Courier findfont 6 scalefont setfont
  820.  
  821.   sepmode 1 eq {
  822.     0 8 translate
  823.     0 1 9 {dup 15 mul 0 boxit 10 div SG fill}for
  824.    }if
  825.  
  826.   sepmode 2 eq sepmode 3 eq or {
  827.     gsave 320 15 translate
  828.     0 0 boxit .5 .41 .41 0 scmyk fill
  829.     15 0 boxit 0 0 0 .5 scmyk fill
  830.     30 0 boxit 1 1 0 0 scmyk fill
  831.     45 0 boxit 1 0 1 0 scmyk fill
  832.     60 0 boxit 0 1 1 0 scmyk fill
  833.     75 0 boxit 1 1 1 0 scmyk fill
  834.     1 SG
  835.     33 -6 moveto (CM) show
  836.     48 -6 moveto (CY) show
  837.     63 -6 moveto (MY) show
  838.     77 -6 moveto (CMY) show
  839.     grestore
  840.  
  841.  
  842.     0 0 0 1 scmyk -6 9 moveto (K) show
  843.     0 1 9 {dup 15 mul 15 boxit 10 div 0 0 0 4 -1 roll scmyk fill}for
  844.  
  845.     1 0 0 0 scmyk -6 -6 moveto (C) show
  846.     0 1 9 {dup 15 mul 0 boxit 10 div 0 0 0 scmyk fill}for
  847.  
  848.     0 1 0 0 scmyk 154 9 moveto (M) show
  849.     0 1 9 {dup 15 mul 160 add 15 boxit 10 div 0 exch 0 0 scmyk fill}for
  850.  
  851.     0 0 1 0 scmyk 154 -6 moveto (Y) show
  852.     0 1 9 {dup 15 mul 160 add 0 boxit 10 div 0 0 3 -1 roll 0 scmyk fill}for
  853.  
  854.    }if
  855.  
  856.   sepmode 4 eq {
  857.     320 0 translate
  858.     0 1 9 {dup 15 mul 0 boxit 10 div SG fill}for
  859.    }if
  860.  
  861.   grestore
  862. }def
  863.  
  864. %
  865. % title1 title2 tilew tileh PRINTERSMARKS -
  866. %
  867. /PrintersMarks {
  868.  /tileh xdef
  869.  /tilew xdef
  870.  /title2 xdef
  871.  /title1 xdef
  872.  
  873.  gsave 0 SG [] 0 setdash 0 setlinejoin 0 setlinecap
  874.  
  875.  180 0 0 cropmark
  876.  270 tilew 0 cropmark
  877.  0 tilew tileh cropmark
  878.  90 0 tileh cropmark
  879.  
  880.  0 15 bv add tilew 2 div tileh regmark
  881.  0 -15 bv sub tilew 2 div 0 regmark
  882.  
  883.  -15 bh sub -15 bv sub 0 0 slurgauge
  884.  15 bh add 15 bv add tilew tileh slurgauge
  885.  
  886.   gsave 1 tilescalex div 1 tilescaley div scale -15 bh sub 8 translate 90 rotate
  887.   /Courier findfont 8 scalefont setfont
  888.   0 0 moveto title1 show
  889.   0 -8 moveto title2 show (  ) show
  890.   currentscreen pop exch 20 string cvs show ( lpi  ) show
  891.   20 string cvs show (\312  ) show
  892.   tilescalex 100 mul 20 string cvs show (%) show
  893.   tilescaley tilescalex ne {(,) show tilescaley 100 mul 20 string cvs show (%) show}if
  894.   grestore
  895.  
  896.  90 bh 15 add 15 tilew 0 colorstrip
  897.  grestore
  898. }bdef
  899.  
  900. end
  901. %%EndProlog
  902.